//
// Created by dxyinme on 2021/10/16.
//

#include "v_sort_array.h"

namespace Vsort {

std::vector<std::tuple<size_t, size_t>> Divide(size_t partSize, size_t len) {
  std::vector<std::tuple<size_t, size_t>> parts;
  size_t it = 0;
  while (it < len) {
    size_t lp = it, rp = std::min(it + partSize, len);
    parts.emplace_back(lp, rp);
    it += partSize;
  }
  return parts;
}

}